package com.ruoyi.detail.mapper;

import com.ruoyi.detail.domain.SessionDetail;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author xgw
 */
public interface SessionDetailMapper {

    //插入SessionDetail
    public int insertSessionDetail(@Param("sessionDetail") SessionDetail sessionDetail);
//
    //更新SessionDetail label = -1 机器人 ， label = userId
    public int updateSessionDetailById(@Param("sessionDetail") SessionDetail sessionDetail);

    //删除SessionDetail
    public int deleteSessionDetailById(@Param("id") Integer id);

    public int deleteSessionDetailBySessionId(@Param("sessionId") Integer sessionId);

    //查询所有的SessionDetail
    public List<SessionDetail> selectAllSessionDetail();

    //查询某个session的sessionDetail
    public List<SessionDetail> selectSessionDetailByLabel(@Param("label") Integer label);

    //根据id查询出sessionDetail
    public SessionDetail selectSessionDetailById(@Param("id")Integer id);

    //动态查询
    public List<SessionDetail> dynamicSelectSessionDetail(
            @Param("username") String username, @Param("sessionId")Integer sessionId,
            @Param("startTime")LocalDateTime startTime, @Param("endTime") LocalDateTime endTime);

    //按照时间搓，查询出某个会话的详细细节，根据时间搓排序
    public List<SessionDetail> selectSessionDetailByTimestamp(@Param("sessionId") Integer sessionId);
}
